#include "test.h"

TestUI::TestUI(QWidget *parent) :QWidget(parent){
	QHBoxLayout* layout = new QHBoxLayout;
	QPushButton *newButton = new QPushButton(tr("New window"));
	layout->addWidget(newButton);
	this->setLayout(layout);
	connect(newButton, SIGNAL(clicked()), this, SLOT(newFileTable()));
}

TestUI::~TestUI(){
}

void TestUI::newFileTable(){
	FileTable *table = new FileTable;
	table->setWindowModality(Qt::WindowModal);
	table->exec();
	int sel = table->getSelection();
	QMessageBox::information(this,QString("Selection"),QString("The selection was %1").arg(sel));
	delete table;
}